# coding = utf-8

from django.urls import path
from rest_framework.routers import DefaultRouter

from .views import WareHouseEntryViewSet, PurchasePayOrderViewSet, WareHouseEntryDetailViewSet, \
    WareHouseEntryListAPIView, PurchasePayOrderDetailViewSet, PurchaseBillAPIView

router = DefaultRouter()
# 后台
router.register(r'entry', WareHouseEntryViewSet, basename="api-warehouse-entry")
router.register(r'entry_detail', WareHouseEntryDetailViewSet, basename="api-warehouse-entry-detail")
router.register(r'pay_order', PurchasePayOrderViewSet, basename="api-purchase-pay-order")
router.register(r'pay_order_detail', PurchasePayOrderDetailViewSet, basename="api-purchase-pay-order-detail")


urlpatterns = [
    path('entry_list/', WareHouseEntryListAPIView.as_view(), name="api-entry-list"),
    path('purchase_bill/', PurchaseBillAPIView.as_view(), name="api-purchase-bill"),
]
urlpatterns += router.urls
